It is becoming more and more common for a variety of appliances and electronic goods to include processing devices embedded within them to provide a high level of functionality for the appliance. For example, embedded processing devices may be found in such disparate appliances as mobile 'phones, TV set top boxes, pagers, coffee makers, toasters, in-car systems, vehicle management control systems and personal digital assistants (PDAs), to name but a few. The market for embedded processing devices is growing extremely fast, in particular new applications and hardware architectures are appearing on an almost daily basis.
With regard to applications, multi-media applications are now necessary for wireless devices, set-top boxes or screen 'phones, amongst other things. Moreover, wireless products have introduced a need for new kinds of applications such as new communication protocols (UMTS), ad hoc networks or neighbourhood interaction protocols based on blue tooth technology, for example. Other applications will be readily recognised by the ordinarily skilled person.
Furthermore, hardware architectures for embedded processing devices are constantly being developed since there is an increasing need for computation capacity, as well as other requirements such as safety-critical systems, autonomy management and power saving features.
Another feature of embedded devices is that they are often one of a plurality of processing devices which form an embedded processing system. Such embedded systems are useful for complex applications such as multi-media applications.
In order to aid application development, and to re-use applications to run on different host processors, it is desirable that the application code is transportable between different host processors. This provides for re-use of whole applications, or parts thereof, thereby increasing the speed of development of applications for new processors and indeed increasing the speed of development of new applications themselves. This may be achieved by means of program code which runs on a host processor and is capable of translating high level program code into operation code or instructions for the host processor. The program code provides a virtual machine for a host processor, enabling it to implement application software written in an appropriate high level language. An example of such translating program code is the JAVA software programming language developed by Sun Microsystems, Inc. (JAVA is a trademark of Sun Microsystems, Inc). Such program code, when running on an appropriate host processor is known as a JAVA software Virtual Machine.
Although examples of embodiments of the present invention will be described with reference to JAVA software and JAVA software Virtual Machines, embodiments in accordance with the invention are not limited to the JAVA programming language but may be implemented using other suitable programming languages for forming virtual machines.
A feature of a virtual machine is that it provides for the dynamic loading of applications onto embedded processing systems. This is an extremely useful feature. Typically, applications are already embedded within a processing system. It is difficult to dynamically download an application or to patch an existing application onto an embedded processing device. However, virtual machines, such as JAVA software enabled, provide the possibility of enabling dynamic loading of a complete application that could be written by a third party and available on a remote server, for example. Moreover, distribution and maintenance costs are reduced since it is possible to dynamically interact with the embedded system via the virtual machine. Due to JAVA software application program interfaces APIs standardisation, the configuration and the profiles, reference [1], for compatibility of applications can be ensured if the JAVA software platform on the embedded system is compliant with the standardisation.
Security features are also available within JAVA software to identify a trusted code which is dynamically downloaded through a network and to preserve the availability of the embedded system.
Another feature of JAVA software is that the hardware architecture heterogeneity management may be masked. A major advantage of such a feature is that it reduces the software development costs of an application. Embedded processors typically are highly diverse and have specific capabilities and capacities directed to the needs of the system or appliance in which they are embedded. This would generally give rise to a high cost of application development. However, because of the portable nature of JAVA software code between JAVA software Virtual Machines, the cost of integrating a new hardware architecture, for example, merely relies on developing a new JAVA software Virtual Machine. Another important feature is that the transparent exploitation of a multi-processor architecture can be achieved by a JAVA software Virtual Machine, without any change of the application code.
Two known JAVA software virtual machines are the JWORKS [6] and KVM, the JAVA software virtual machine of J2MF [7]. JWORKS is part of personal JAVA software virtual machine distribution on VXWORKS real-time operating systems. As VXWORKS is designed to be integrated on a large range of hardware platforms and because JWORKS is, at least from the operating system point of view, an application respecting VXWORKS APIs, JWORKS could be executed on a large range of hardware platforms. Nevertheless, the integration of JWORKS on a new embedded system is limited to the VXWORKS porting ability, without any consideration of the JAVA software virtual machine. However, as will be described in detail later, a JAVA software virtual machine must take care of many different aspects. In light of this, JWORKS is unable to provide the best trade-off for a dedicated embedded system, since it does not take into account the different requirements of target host processors in the embedded system.
J2ME is a Sun Java platform for small embedded devices. KVM is the JAVA software virtual machine of J2ME. It supports 16 and 32 bits CISC and RISC processors, and generates a small memory footprint and can keep the code in a memory area of about 128 KB. It is written for a ANSI C compiler with the size of basic types well defined (e.g. character on 8 bits, long on 32 bits). This is why it is difficult to port the KVM onto another compiler (for example the TI DSP C55x C family compilers support characters on 16 bits), without rewriting all the JAVA software virtual machines. Additionally, an optional data alignment can only be obtained for 64 bit data. Other alignments are handled by the C compiler. Moreover, there is no possibility to manage a heterogeneous multiprocessor without re-writing C structures (due to data representation conversion). It is also not possible to tune a trade-off between memory and access costs without re-writing substantially all the parts of the JAVA software virtual machine.
A problem with the increasing development of new hardware architectures for embedded devices is that it is necessary to continually develop new virtual machines for the new devices. In principle, a virtual machine designed to run in accordance with a particular operating system might well be capable of being used on different host processing devices utilising that operating system, it is generally the case that the different generations of hardware architecture mean that a virtual machine for one processor is not optimised for another host processing device. Consequently, in order to provide the greatest capabilities and efficiencies from a host processor, a virtual machine needs to be designed for each target processor. This increases the cost and delays incorporating new processing devices into embedded systems.